package com.jiang.myfm.adapters;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by dell on 2016/12/2 0002.
 */
public class DownloadAdapter extends FragmentPagerAdapter {

    private List<Fragment> mFragments;
    public DownloadAdapter(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        mFragments=fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }

    @Override
    public CharSequence getPageTitle(int position) {
        String[] tabStr = new String[]{"专辑","声音","下载中"};
        return tabStr[position];
    }

    @Override
    public int getCount() {
        return mFragments.size();
    }
}
